/**
 * 
 */
package com.roc.util.constant;

import org.apache.commons.lang3.StringUtils;

/**
 * @author chenkai 
 */
public enum TerminalBrand {
	 
	 BRAND_BAIFU("百富", "01"),//S90 S58
	 BRAND_TUHAOJIN("土豪金", "02"),//S98
	 BRAND_HUAZHIRONG("华智融", "03"),//8210 8110
	 BRAND_SHIDA("实达", "04"),//WP50 S-980
	 BRAND_LIANDI("联迪", "05"),//E330 E550
	 BRAND_NEWLAND("新大陆", "06"),//ME31S
	 BRAND_A6("一鸣神州", "07"),//A6
	 BRAND_HXTEK("银点", "08")//S500
	 ;
	 
	 
	 
	private String code;
	private String name;
	private boolean editAble;
	private boolean enabled;

	private TerminalBrand( String name,String code) {
		this.code = code;
		this.name = name;
		
	}

	public boolean isEditAble() {
		return editAble;
	}

	public boolean isEnabled() {
		return enabled;
	}

	public String getCode() {
		return code;
	}

	public String getName() {
		return name;
	}

	public static TerminalBrand valueOfCode(String code) {
		if (StringUtils.isBlank(code)) {
			throw new IllegalArgumentException("TerminalBrand code " + code
					+ " is blank");
		}
		for (TerminalBrand ms : values()) {
			if (ms.getCode().equals(code)) {
				return ms;
			}
		}
		throw new IllegalArgumentException("TerminalBrand code " + code
				+ " is not exist");
	}

}
